<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>
      <%= htmlWebpackPlugin.options.title %>
    </title>
    <script>
      var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
      document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')
    </script>
    <script>
      var sitecode = '';
      var search = window.location.search
      if(search && search.indexOf('?') !== -1) {
        if(search.length === 5) {
          sitecode = search.substr(1, 4)
        } else if (search.length > 5) {
          var char = search.charAt(5)
          if(char === '&' || char === '#' || char === '=' || char === '/') {
            sitecode = search.substr(1, 4)
          }
        }
      }
      if (!sitecode) {
        sitecode = localStorage.getItem('sitecode') || ''
      }
      var script = document.createElement('script');
      script.src = '/api.php/h5/getSiteId?sitecode=' + sitecode
      document.head.appendChild(script)
    </script>
    <link rel="stylesheet" href="<%= BASE_URL %>static/index.<%= VUE_APP_INDEX_CSS_HASH %>.css" />
  </head>
  <body>
    <div id="app"></div>
  </body>
</html>
